package com.cg.controller;

import com.cg.service.OrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
@RequiredArgsConstructor
public class OrderController {

    private final OrderService orderService;

    @GetMapping("/generateOrder/{userId}/{orderNum}")
    public void generateOrder(@PathVariable("userId") Integer userId, @PathVariable("orderNum") Integer orderNum) {
        orderService.generateOrder(userId, orderNum);
    }

}
